home *** CD-ROM | disk | FTP | other *** search
- Short: FFT program and test signal generator (PPC)
- Author: Steve Sampson, Andreas R. Kleinert (Amiga port)
- Uploader: info@ar-kleinert.de
- Type: dev/c
-
- *************************************************************************
-
- The FFT program and test signal generators included in the archive, can be
- used to perform signal analysis in the frequency domain, using samples in the
- time domain. Historically the applications have ranged from music to radar. [...]
-
- The original Byte Magazine program (see references below) was designed for real
- data only. In my experiments I needed to preserve both real and imaginary
- data. If you feed the FFT real data only, then the output will be a mirror
- image, and you can ignore the left side. Two signal generators are included.
- One generates sine waves (sine) and the other generates pulses (pulse). Some
- papers I found on the subject of FFTs are included at the end. There are
- several books devoted to the subject also. [...]
-
- For the Amiga example (based on Unix code) try:
-
- sine 16 in
- 1000
- 3000
-
- Which will sample the 1 Khz data every 333 microseconds (1 / 3 Khz). Note: The
- sample frequency should be greater than 2 times the input frequency (Nyquist
- and all that...).
-
- Then run fft:
-
- fft 16 in out
-
- And you should see a display like so:
-
- 0 |======= (-1500.0 Hz)
- 1 |===== (-1312.5 Hz)
- 2 |==== (-1125.0 Hz)
- 3 |==== (-937.0 Hz)
- 4 |=== (-750.0 Hz)
- 5 |=== (-562.5 Hz)
- 6 |=== (-375.0 Hz)
- 7 |=== (-187.5 Hz)
- 8 |==== <------- DC (000.0 Hz)
- 9 |==== <------- Fundamental (187.5 Hz)
- 10 |====== <------- Second Harmonic (375.0 Hz)
- 11 |======== (562.5 Hz)
- 12 |============== (750.0 Hz)
- 13 |========================================================
- 14 |============================ (1125.0 Hz) ^
- 15 |=========== (1312.5 Hz) |
- |
- [13 - 8 (center)] * 187.5 = 937.0 Hz
-
- The fundamental display frequency is:
-
- T = Time Increment Between Samples
- N = Number Of Samples
- Tp = N * T
-
- Then F = 1 / Tp
-
- In the example above, the time increment between samples is
- 1 / 3000 or 333 microseconds. N = 16, so Tp = 5333 microseconds
- and 1 / .005333 is 187.5 Hz.
-
- Therefore each filter is a multiple of 187.5 Hertz. Filter 8 in this
- example is center, so that would be zero, 9 would be one, etc.
-
- [...]
-
- *************************************************************************
-
- The Amiga PPC version comes with the three programs fft.elf, pulse.elf and
- sine.elf, which all were derived from the unix version - with slight
- modifications.
-
- Maybe someone likes to do a graphical interface for this code...
-
- --
- ARK, 31/May/2000
-
-
- ============================= Archive contents =============================
-
- Original Packed Ratio Date Time Name
- -------- ------- ----- --------- -------- -------------
- 15702 5546 64.6% 31-May-00 10:16:44 +FFT.C
- 71855 28602 60.1% 31-May-00 10:36:56 +fft.elf
- 17174 17174 0.0% 31-May-00 10:14:46 +fft_c.zip
- 3353 1264 62.3% 31-May-00 10:47:44 +fftPPC.readme
- 140 88 37.1% 31-May-00 10:36:46 +malloc.h
- 921 383 58.4% 13-May-91 07:47:28 +MAKEFILE
- 985 536 45.5% 31-May-00 10:16:44 +PULSE.C
- 44096 19918 54.8% 31-May-00 10:41:02 +pulse.elf
- 5665 2746 51.5% 31-May-00 10:28:54 +READ.DOC
- 238 151 36.5% 31-May-00 10:36:26 +SCOPTIONS
- 1139 625 45.1% 31-May-00 10:16:44 +SINE.C
- 58876 25924 55.9% 31-May-00 10:38:50 +sine.elf
- 605 183 69.7% 31-May-00 10:38:46 +smakefile
- 6095 2279 62.6% 31-May-00 10:34:24 +UFFT.C
- 1760 811 53.9% 31-May-00 10:40:54 +UPULSE.C
- 5220 2194 57.9% 31-May-00 10:28:54 +UREAD.DOC
- 1910 893 53.2% 31-May-00 10:38:22 +USINE.C
- -------- ------- ----- --------- --------
- 235734 109317 53.6% 31-May-100 18:45:36 17 files
-